import { createRouter, createWebHistory } from 'vue-router'
import Layout from '@/views/layout/index.vue'
import Login from '@/views/user/login.vue'
import UserView from '@/views/user/index.vue'
import HomeView from '@/views/home/home.vue'
import ReviewView from '@/views/quality/review/index.vue'
import TextView from '@/views/quality/text/index.vue'
import CheckTypeView from '@/views/checkType/index.vue'
import CheckItemView from '@/views/checkItem/index.vue'
import CheckShemaView from '@/views/checkShema/index.vue'


const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      component: Layout,
      redirect:'/home',
      children:[
        {path: '/home',  component: HomeView },
        {path:'/userList' ,name:'userList' ,component:UserView},
        {path:'/text' ,name:'text' ,component:TextView},
        {path:'/review' ,name:'review' ,component:ReviewView},
        {path:'/checkShema' ,name:'CheckShema' ,component:CheckShemaView},
        {path:'/qc/checkType',name:'checkType',component:CheckTypeView},
        {path:'/qc/checkItem',name:'checkItem',component:CheckItemView}
      ]
    },{
      path: '/login',
      name: 'login',
      component: Login
    }
    
  ]
})

export default router
